// SCommTestDlg.h : header file
//
//{{AFX_INCLUDES()
#include "mscomm.h"
//}}AFX_INCLUDES

#if !defined(AFX_SCOMMTESTDLG_H__48E437B5_A8F7_4A76_8099_795619A6B5CD__INCLUDED_)
#define AFX_SCOMMTESTDLG_H__48E437B5_A8F7_4A76_8099_795619A6B5CD__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

/////////////////////////////////////////////////////////////////////////////
// CSCommTestDlg dialog

class CSCommTestDlg : public CDialog
{
// Construction
// 	_ConnectionPtr m_pConnection;
// 	_RecordsetPtr m_pRecordset;
// 	CListCtrl m_list;
	CStringArray m_astrNwkaddr ;
	CStringArray m_astrNodeID ;
	CStringArray m_asrtNodetype ;
	CString m_strIPaddress ;
	CString m_strDBname ;
	CString m_strUID  ;
	CString m_strPWD  ;
	CString m_strPORT ;
	BOOL m_bTimerTag;
	CString m_strSerialNumber;
	CString m_strSendTimeInterval;
	CString m_strTimer;
	NOTIFYICONDATA NotifyIcon;
	CStdioFile file;	

public:
	CSCommTestDlg(CWnd* pParent = NULL);	// standard constructor
	char CSCommTestDlg::ConvertHexChar(char ch);
	int CSCommTestDlg::String2Hex(CString str, CByteArray &senddata);
	CString CSCommTestDlg::StrhextoSng(CString) ;
	CString CSCommTestDlg::OpenDB(_RecordsetPtr &DBTable ,CString,CString,CString,CString ,CString);
	void CSCommTestDlg::SendHex(CString strTXData);
	CString CSCommTestDlg::ReadtheINI(CString strRSection, CString strRSectionKey);

// Dialog Data
	//{{AFX_DATA(CSCommTestDlg)
	enum { IDD = IDD_SCOMMTEST_DIALOG };
	CButton	m_ctrlHexDisplay;
	CButton	m_ctrlHexSend;
	CMSComm	m_ctrlComm;
	CString	m_strRXData;
	CString m_strRXData_tmp;
	CString m_strSendTime;
	
	
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CSCommTestDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CSCommTestDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnComm();
	afx_msg void OnButtonManualsend();
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg void OnButtonKilltimer();
	afx_msg void OnCheckHexdisplay();
	afx_msg void OnCheckHexsend();
	afx_msg void OnBUTTONMinimize();
	afx_msg LRESULT  onShowNotifyIconMenu(WPARAM wParam , LPARAM lParam);
	afx_msg void OnMENUITEMCLOSENotifyIcon();
	DECLARE_EVENTSINK_MAP()
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()




};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_SCOMMTESTDLG_H__48E437B5_A8F7_4A76_8099_795619A6B5CD__INCLUDED_)
